#include <bits/stdc++.h>

using namespace std;
const int maxn=100010;
struct node
{
    int depth;
    vector<int> childs;
} treeNodes[maxn];
int nodes_cnt;
double pp,rate;
map<int,int,greater<int>> depthNum;
void DFS(int index,int depth)
{
    treeNodes[index].depth=depth;
    if (treeNodes[index].childs.size()==0)
    {
        ++depthNum[depth];
        return;
    }
    for (size_t i=0;i<treeNodes[index].childs.size();++i )
    {
        DFS(treeNodes[index].childs[i],depth+1);
    }
}
int main_1090()
{
    scanf("%d%lf%lf",&nodes_cnt,&pp,&rate);
    int supplier,root;
    rate/=100;
    for (size_t i=0; i<nodes_cnt ; ++i )
    {
        scanf("%d",&supplier);
        if (supplier==-1)
        {
            root=i;
        }
        else
        {
            treeNodes[supplier].childs.push_back(i);
        }
    }
    DFS(root,0);
    auto dep2num=depthNum.begin();
    printf("%.2f %d",pow(1+rate,dep2num->first)*pp,dep2num->second);
    return 0;
}
